package com.springboot.idempotence.busi;

import com.springboot.idempotence.redis.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BusinessService {
    @Autowired
    private BusinessRepository businessRepository;

    public String testIndempotence() {
        Business business = new Business();
        business.setBusiId(StringUtils.uuid());
        business.setBusiName("测试幂等");
        Business save = businessRepository.save(business);
        return save.toString();
    }
}
